import bus from "@/bus";
import { renderButton } from '@/util';
let data = {
  status: 'pass',
  totalItem: 1,
  pageSize: window.$pageSize,
  currentPage: 1,
  columns: [{
    title: '门店类型ID',
    key: 'id',
    align: 'left',
    minWidth: 200
  },{
    title: '门店类型',
    key: 'name',
    align: 'left',
    minWidth: 150
  }, {
    title: '建店门店',
    key: 'isSpecial',
    align: 'left',
    minWidth: 100,
    render: (h, params) => {
      return (<span>{params.row.isSpecial ? '是':'否'}</span>)
    }
  }, {
    title: '计算积分',
    key: 'isCalculateIntegral',
    align: 'left',
    minWidth: 100,
    render: (h, params) => {
      return (<span>{params.row.isCalculateIntegral ? '是':'否'}</span>)
    }
  }, {
    title: '计算返利',
    key: 'isCalculateRebate',
    align: 'left',
    minWidth: 100,
    render: (h, params) => {
      return (<span>{params.row.isCalculateRebate ? '是':'否'}</span>)
    }
  }, {
    title: '计算基金',
    key: 'isCalculateFund',
    align: 'left',
    minWidth: 100,
    render: (h, params) => {
      return (<span>{params.row.isCalculateFund ? '是':'否'}</span>)
    }
  },
  {
    key: '',
    align: 'left',
    minWidth: 120,
    renderHeader: (h, params) => {
      let oDiv = h('div', [
        h('span', '入库后出库'),
        h('Icon', {
          props: {
            type: 'ios-help-circle'
          }
        })
      ])
      return h('Tooltip', {
        style: {
          cursor: 'pointer'
        },
        props: {
          'max-width': "200",
          transfer: true,
          content: '门店扫码入库后的条码直接出库'
        }
      }, [oDiv])
    },
    render: (h, params) => {
      return (<span>{params.row.isBarcodeStoreOut ? '是':'否'}</span>)
    }
  },
  {
    title: '操作',
    align: 'right',
    minWidth: 150,
    render: (h, params) => {
      return (
        <div>
          { renderButton(h, { text: '编辑', type: 'primary',},
            ()=>{ bus.$emit("onEdit", params.row)})}
        </div>
      )
    }
  }],
  data: []
}
export default data;
